package com.ruoyi.asms.domain;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 巡检信息对象 inspection
 * 
 * @author yfkj
 * @date 2021-10-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Inspection extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 巡检信息主键 */
    @TableField(exist = true)
    @TableId(type= IdType.AUTO)
    @ApiModelProperty(value =  "${comment}")
    private Long inspectionId;
    /** 巡检任务外键 */
    @Excel(name = "巡检任务外键")
    @TableField(exist = true)
    @ApiModelProperty(value =  "巡检任务外键")
    private Long inspectionTaskId;
    /** 资产位置外键 */
    @Excel(name = "资产位置外键")
    @TableField(exist = true)
    @ApiModelProperty(value =  "资产位置外键")
    private Long addressId;
    /** 故障信息主键数组 */
    @Excel(name = "故障信息主键数组")
    @TableField(exist = true)
    @ApiModelProperty(value =  "故障信息主键数组")
    private Long faultId;
    /** 巡检结果类型(0：正常，1：设备故障，2：设备漏绑，3：安装位置码缺失，4：其他) */
    @Excel(name = "巡检结果类型(0：正常，1：设备故障，2：设备漏绑，3：安装位置码缺失，4：其他)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "巡检结果类型(0：正常，1：设备故障，2：设备漏绑，3：安装位置码缺失，4：其他)")
    private Integer resultType;
    /** 巡检人 */
    @Excel(name = "巡检人")
    @TableField(exist = true)
    @ApiModelProperty(value =  "巡检人")
    private Long inspectionUserId;
    /** 状态(-1退回或转让，0正在处理中，1处理结束) */
    @Excel(name = "状态(-1退回或转让，0正在处理中，1处理结束)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "状态(-1退回或转让，0正在处理中，1处理结束)")
    private Integer status;
    /** 巡检结果信息 */
    @Excel(name = "巡检结果信息")
    @TableField(exist = true)
    @ApiModelProperty(value =  "巡检结果信息")
    private String inspectionInfo;
    /** 开始时间 */
    @Excel(name = "开始时间")
    @TableField(exist = true)
    @ApiModelProperty(value =  "开始时间")
    private Long startTime;
    /** 结束时间 */
    @Excel(name = "结束时间")
    @TableField(exist = true)
    @ApiModelProperty(value =  "结束时间")
    private Long endTime;
    @TableField(exist = true)
    @ApiModelProperty(value =  "资产Id")
    private Long assetId;

    @ApiModelProperty(value =  "资产所属部门Id")
    private Long ownDeptId;

    @TableField(exist = true)
    private String trajectory;
    @TableField(exist = true)
    private String images;
    @TableField(exist = true)
    @ApiModelProperty(value =  "1轨迹记录中，轨迹记录结束")
    private Integer locationState;

    public static final String INSPECTION_ID="inspection_id";
    public static final String INSPECTION_TASK_ID="inspection_task_id";
    public static final String ADDRESS_ID="address_id";
    public static final String FAULT_ID="fault_id";
    public static final String RESULT_TYPE="result_type";
    public static final String TRAJECTORY="trajectory";
    public static final String INSPECTION_USER_ID="inspection_user_id";
    public static final String STATUS="status";
    public static final String IMAGES="images";
    public static final String INSPECTION_INFO="inspection_info";
    public static final String START_TIME="start_time";
    public static final String END_TIME="end_time";
    public static final String CREATE_BY="create_by";
    public static final String CREATE_TIME="create_time";
    public static final String UPDATE_BY="update_by";
    public static final String UPDATE_TIME="update_time";
    public static final String REMARK="remark";
    public static final String ASSET_ID="asset_id";
    public static final String OWN_DEPT_ID="own_dept_id";
    public static final String LOCATION_STATE="location_state";

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("inspectionId", getInspectionId())
            .append("inspectionTaskId", getInspectionTaskId())
            .append("addressId", getAddressId())
            .append("faultId", getFaultId())
            .append("resultType", getResultType())
            .append("inspectionUserId", getInspectionUserId())
            .append("status", getStatus())
            .append("inspectionInfo", getInspectionInfo())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
